package org.jeecg.modules.wlhy.invoice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: hy_invoice
 * @Author: jeecg-boot
 * @Date:   2021-04-14
 * @Version: V1.0
 */
@Data
@TableName("hy_invoice")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="hy_invoice对象", description="hy_invoice")
public class HyInvoice implements Serializable {
    private static final long serialVersionUID = 1L;

    /**id*/
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private String id;
    /**发票流水号*/
    @Excel(name = "发票流水号", width = 15)
    @ApiModelProperty(value = "发票流水号")
    private String invoiceNum;
    /**发票说明*/
//	@Excel(name = "发票说明", width = 15)
    @ApiModelProperty(value = "发票说明")
    private String title;
    /**运单id列表*/
//	@Excel(name = "运单id列表", width = 15)
    @ApiModelProperty(value = "运单id列表")
    private String shippingIds;
    /**开票类型*/
    @Excel(name = "开票类型", width = 15,dicCode = "invoice_type")
    @ApiModelProperty(value = "开票类型")
    @Dict(dicCode = "invoice_type")
    private String invoiceType;
    /**备注*/
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
    /**开票图片*/
//	@Excel(name = "开票图片", width = 15)
    @ApiModelProperty(value = "开票图片")
    private String img;
    /**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**创建日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    /**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**更新日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
    /**删除状态(0-正常,1-已删除)*/
    @ApiModelProperty(value = "删除状态(0-正常,1-已删除)")
    @TableLogic
    private String delFlag;
    /**货主*/
//	@Excel(name = "货主", width = 15)
    @ApiModelProperty(value = "货主")
    @Dict(dictTable = "hy_customer", dicText = "customer_name", dicCode = "id")
    private String customerId;
    /**货主名称*/
    @Excel(name = "货主名称", width = 15)
    @ApiModelProperty(value = "货主名称")
    private String customerName;
    /**货主纳税人识别号*/
    @Excel(name = "货主纳税人识别号", width = 15)
    @ApiModelProperty(value = "货主纳税人识别号")
    private String customerCreditCode;
    /**货主地址及电话*/
    @Excel(name = "货主地址及电话", width = 15)
    @ApiModelProperty(value = "货主地址及电话")
    private String customerAddressPhone;
    /**货主开户行及账号*/
    @Excel(name = "货主开户行及账号", width = 15)
    @ApiModelProperty(value = "货主开户行及账号")
    private String customerBank;
    /**分公司*/
//	@Excel(name = "分公司", width = 15)
    @ApiModelProperty(value = "分公司")
    @Dict(dictTable = "hy_company", dicText = "company_name", dicCode = "id")
    private String companyId;
    /**分公司名称*/
    @Excel(name = "分公司名称", width = 15)
    @ApiModelProperty(value = "分公司名称")
    private String companyName;
    /**分公司纳税人识别号*/
    @Excel(name = "分公司纳税人识别号", width = 15)
    @ApiModelProperty(value = "分公司纳税人识别号")
    private String companyCreditCode;
    /**分公司地址及电话*/
    @Excel(name = "分公司地址及电话", width = 15)
    @ApiModelProperty(value = "分公司地址及电话")
    private String companyAddressPhone;
    /**分公司开户行及账号*/
    @Excel(name = "分公司开户行及账号", width = 15)
    @ApiModelProperty(value = "分公司开户行及账号")
    private String companyBank;

    /**金额*/
    @Excel(name = "金额", width = 15,type = 4)
    @ApiModelProperty(value = "金额")
    private BigDecimal invoiceAmt;
    /**单价*/
    @Excel(name = "单价", width = 15,type = 4)
    @ApiModelProperty(value = "单价")
    private BigDecimal invoicePrice;
    /**数量*/
    @Excel(name = "数量", width = 15,type = 4)
    @ApiModelProperty(value = "数量")
    private BigDecimal invoiceGoodsWeight;
    /**税率*/
    @Excel(name = "税率", width = 15,type = 4)
    @ApiModelProperty(value = "税率")
    private BigDecimal invoiceRate;
    /**税额*/
    @Excel(name = "税额", width = 15,type = 4)
    @ApiModelProperty(value = "税额")
    private BigDecimal invoiceTax;
    /**价税合计*/
    @Excel(name = "价税合计", width = 15,type = 4)
    @ApiModelProperty(value = "价税合计")
    private BigDecimal invoiceTaxAmt;
    /**开票状态(1申请中2已开票)*/
    @Excel(name = "开票状态", width = 15,dicCode = "invoice_status")
    @ApiModelProperty(value = "开票状态(1申请中2已开票)")
    @Dict(dicCode = "invoice_status")
    private String invoiceStatus;
    /**申请开票时间*/
    @Excel(name = "申请开票时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "申请开票时间")
    private Date regDt;
    /**开票时间*/
    @Excel(name = "开票时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开票时间")
    private Date invoiceDt;
    /**开票人*/
    @Excel(name = "开票人", width = 15)
    @ApiModelProperty(value = "开票人")
    private String kprName;
    /**开票人id*/
//	@Excel(name = "开票人id", width = 15)
    @ApiModelProperty(value = "开票人id")
    private String kprId;
    /**运单数*/
    @Excel(name = "运单数", width = 15,type = 4)
    @ApiModelProperty(value = "运单数")
    private Integer shippingNums;

    @Excel(name = "发票代码", width = 15)
    @ApiModelProperty(value = "发票代码")
    private String invoiceCode;

    @Excel(name = "发票号码", width = 15)
    @ApiModelProperty(value = "发票号码")
    private String invoiceHm;

    /**总实际装载量*/
    @Excel(name = "总装载量", width = 15)
    @ApiModelProperty(value = "总实际装载量")
    private BigDecimal goodsWeightLoading;
    /**总实际卸货量*/
    @Excel(name = "总卸货量", width = 15)
    @ApiModelProperty(value = "总实际卸货量")
    private BigDecimal goodsWeightUnloading;
    /**总货物实际亏损量*/
    @Excel(name = "总亏损量", width = 15)
    @ApiModelProperty(value = "总货物实际亏损量")
    private BigDecimal goodsWeightLoss;
    /**总应付运费*/
    @Excel(name = "总应付运费", width = 15)
    @ApiModelProperty(value = "总应付运费")
    private BigDecimal costPay;
    /**总实际运费金额*/
    @Excel(name = "总实付运费", width = 15)
    @ApiModelProperty(value = "总实际运费金额")
    private BigDecimal costPayShipping;
    /**总服务费*/
    @Excel(name = "总服务费", width = 15)
    @ApiModelProperty(value = "总服务费")
    private BigDecimal costService;

    @ApiModelProperty(value = "总油气费")
    private BigDecimal gasAmount;

    /**总亏损金额*/
    @Excel(name = "总亏损金额", width = 15)
    @ApiModelProperty(value = "总亏损金额")
    private BigDecimal costLoss;
    /**总实付合计*/
    @Excel(name = "总实付合计", width = 15)
    @ApiModelProperty(value = "总实付合计")
    private BigDecimal costPayTotal;

    @ApiModelProperty(value = "开票数量选择(1装货量2卸货量0两者取小)")
    private String invoiceWeightType;
}
